Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: open window (from drag) under mouse #1698

Draft
wants to merge 2 commits into
base: v5
Choose a base branch
from

Conversation

rebelonion
Copy link

This PR makes new windows opened by dragging a tab from sidebery to outside the container open directly under the mouse.

The new window will open with an offset relative to where the user's mouse was inside the original window, mimicking Firefox's default tab behavior.

Tested on 1080p, 1440p, and multi-window.

Before
2024-06-26.09-21-24.mp4
After
2024-06-26.09-21-41.mp4

@rebelonion
Copy link
Author

since maximized may not be combined with left, top, width, or height, to get a new window to open maximized on the correct screen/monitor, it needs to be opened with the normal state with the correct left and top, then maximized.

An odd behavior I found was if the initial window was maximized, the new window would always open maximized first before shrinking, even when given a normal state. This would ruin the new x and y for the new screen. I got around this by forcing a width and height of the new window before maximizing it.
Idk why Firefox always maximizes first. Almost seems like a bug on their side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant